<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
package ${basepackage}.service;

import ${basepackage}.repository.base.*;
import ${basepackage}.common.ui.pagination.*;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

<#include "/java_imports.include">
@Service
public class ${className}Service{

	@Autowired
	private ${className}Mapper ${classNameLower}Mapper;
	
	@Transactional(readOnly=true)
	public Page<${className}> findByPageRequest(PageRequest pr) {
		return ${classNameLower}Mapper.findByPageRequest(pr);
	}
	
<#list table.columns as column>
	<#if column.unique && !column.pk>
	@Transactional(readOnly=true)
	public ${className} getBy${column.columnName}(${column.javaType} v) {
		return ${classNameLower}Mapper.getBy${column.columnName}(v);
	}	
	</#if>
</#list>
}